package pit.com.ordermobilesystem.adapter;

import java.util.ArrayList;

import pit.com.ordermobilesystem.fragment.BaseTabFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;





public class BaseTabAdapter extends FragmentPagerAdapter{
	private ArrayList<BaseTabFragment> listBaseTabFragment;

	    public BaseTabAdapter(FragmentManager fm,ArrayList<BaseTabFragment> listBaseTabFragment) {
	        super(fm);
	        this.listBaseTabFragment=listBaseTabFragment;
	    }

	    @Override
	    public Fragment getItem(int position) {
	        return listBaseTabFragment.get(position);
	    }

	    @Override
	    public int getCount() {
	        return listBaseTabFragment.size();
	    }
	    
	    
	    @Override
	      public CharSequence getPageTitle(int position) {
	            return listBaseTabFragment.get(position).getTitleTab().toUpperCase();
	    }
	    
	    
}
